package mapping

import (
	"ota/model"
	"ota/model/entity"
)

// FirmwareTypesEntityToDto entity data transfer
func FirmwareTypesEntityToDto(firmwareTypes []*entity.FirmwareType) []*model.FirmwareTypeInfo {
	out := make([]*model.FirmwareTypeInfo, 0, len(firmwareTypes))
	for _, c := range firmwareTypes {
		out = append(out, FirmwareTypeEntityToDto(c))
	}
	return out
}

// FirmwareTypeEntityToDto entity data transfer
func FirmwareTypeEntityToDto(e *entity.FirmwareType) *model.FirmwareTypeInfo {
	return &model.FirmwareTypeInfo{

		Id: e.Id,

		Name: e.Name,

		Description: e.Description,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
